
#ifndef WARNNING_H
#define WARNNING_H
#include "SensorNotify.h"
#include <qobject.h>
#include <qtimer.h>
class Warnning : public SensorNotify
{
	Q_OBJECT
	public:
		Warnning(int ledId);
		~Warnning();

		void update(const SensorState& state);
	public slots:
		void toWarnning();
	signals:
		void cancelWarnning();
	private slots:
		void startWarnning();

	private:
		QTimer* m_timer;
		void ledOn();
		void ledOff();
		int m_fd;
		int m_ledId;
		bool m_isOn;
		bool checkIsCancel();
};
#endif
